import { createRouter, createWebHistory } from 'vue-router'

// 导入组件
import HomeView from '../views/HomeView.vue'
import AboutView from '../views/AboutView.vue'
import ToolsDemoView from '../views/ToolsDemoView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    component: AboutView
  },
  {
    path: '/tools',
    name: 'tools',
    component: ToolsDemoView
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router